package cn.edu.scau.sec.caixiaoqing.adapter;

import java.util.Calendar;

public class Adaptee {
    public void printCalendar(Calendar calendar){

        int year = calendar.get(Calendar.YEAR);
        int month = calendar.get(Calendar.MONTH) + 1;
        int day = calendar.get(Calendar.DATE);

        System.out.println("你好，我是被适配的类，你输入的日期是：" + year + "年" + month +"月" + day +"日");
    }
}
